<?php
require(dirname(__FILE__) .'/../config.inc');
require('rest.class.inc');
require(ROOT . '/misc/functions.inc');
require(ROOT . '/misc/interfaces.inc');
require(ROOT . LIBRARY .'/filters.class.inc');

/**
 * Call method:
 * 
 * {method:'comments.switchActive', data: {id: id, active: sw2state}}
 *
 */

session::startSession();
$R = REST::processRequest();

/**
 * Autoload Classes
 * @param string $class
 */
function __autoload($class)
{
   $class = '/'. str_replace('_', '/', strtolower($class)) .'.class.inc';
   if(file_exists(ROOT . LIBRARY . $class))
   {
      require_once(ROOT . LIBRARY . $class);
   }
}